package com.ht.temp.service.impl;

import com.ht.temp.entity.Home;
import com.ht.temp.mapper.HomeMapper;
import com.ht.temp.service.IHomeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author mayke_zhou
 * @since 2018-12-25
 */
@Service
@Transactional
public class HomeServiceImpl extends ServiceImpl<HomeMapper, Home> implements IHomeService {

     @Autowired
     private  HomeMapper homeMapper;

    @Override
    public int deleteByPrimaryKey(Integer homeId) {
        return homeMapper.deleteByPrimaryKey(homeId);
    }

    @Override
    public int insertSelective(Home record) {
        return homeMapper.insertSelective(record);
    }

    @Override
    public Home selectByPrimaryKey(Integer homeId) {
        return homeMapper.selectByPrimaryKey(homeId);
    }

    @Override
    public int updateByPrimaryKeySelective(Home record) {
        return homeMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Home> selectByHome(Home record) {
        return homeMapper.selectByHome(record);
    }

    @Override
    public List<Home> getAllHome() {
        return homeMapper.selectHome();
    }
}
